package com.shop.controller;

import com.shop.pojo.CommonResult;
import com.shop.service.ILoginService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author truezir_tech_team
 */
@RestController
public class LoginController {
    @Resource
    private ILoginService loginService;

    @PostMapping("/login")
    public CommonResult<Map> login(@RequestParam("username") String username, @RequestParam("password") String password) {

        return loginService.login(username, password);
    }
}
